<!DOCTYPE html>
<html data-dpr="1" style="font-size: 37.5px;">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1">
    <title>修改密码</title>
    <link href="/static_new6/css/app.7b22fa66c2af28f12bf32977d4b82694.css" rel="stylesheet">
    <link rel="stylesheet" href="/static_new/css/public.css">

    <script charset="utf-8" src="/static_new/js/jquery.min.js"></script>
    <script charset="utf-8" src="/static_new/js/common.js"></script>
    <script charset="utf-8" src="/static_new/js/dialog.min.js"></script>

    <style type="text/css" title="fading circle style">
        .circle-color-8 > div::before {
            background-color: #ccc;
        }
    </style>
</head>
<body style="font-size: 12px;">
<div id="app">
    <div data-v-61ea9512="" class="main">
        <div data-v-61ea9512="" class="header">
            <div class="left_btn" onclick="window.history.back(-1)">
                <img
                        src=""
                        alt="" class="return">
            </div>
            <div class="Maintitle"><h3>修改名称</h3></div>
            <div class="right_btn"></div>
        </div>
        <div data-v-61ea9512="" class="bink_card">
            <h3 data-v-61ea9512="">请修改您的名称</h3>
            <ul data-v-61ea9512="" class="bink_card_ul">
                <li data-v-61ea9512="">
                    <h4 data-v-61ea9512="">名称</h4>
                    <input data-v-61ea9512="" type="text" placeholder="输入名称" value="{$info.username}" name="username" class="code">
                </li>
            </ul>
        </div>
        <button data-v-61ea9512="" class="save-btn">确定修改</button>
    </div>
</div>

<script>
    $(function () {
        function check() {
            if ($("input[name=username]").val() == '') {
                $(document).dialog({infoText: '用户名不能为空！'});
                return false;
            }
            return true;
        }

        /*点击登录*/
        $(".save-btn").on('click', function () {
            if (check()) {
                var loading = null;
                $.ajax({
                    url: "",
                    data: {username:$("input[name=username]").val()},
                    type: 'POST',
                    beforeSend: function () {
                        loading = $(document).dialog({
                            type: 'notice',
                            infoIcon: '/static_new/img/loading.gif',
                            infoText: '{:lang("bank_loding")}',
                            autoClose: 0
                        });
                    },
                    success: function (data) {

                        if (data.code == 0) {
                            $(document).dialog({infoText: '保存成功'});
                            setTimeout(function () {
                                window.history.back(-1);
                            }, 2000);
                        } else {
                            loading.close();
                            $(document).dialog({infoText: data.info});
                        }
                    }
                });
            }
        });
    })
</script>

</body>
</html>